﻿using System.Collections.Generic;
using CID.Domain.Audit;
using CID.Domain.Development;
using CID.Domain.Users;

namespace CID.Domain.Operations
{
    public interface IEnvironment : IDescribedEntity
    {
        bool Enabled { get; set; }
        bool IsProduction { get; set; }
        IUser Responsible { get; set; }
        IEnumerable<IServerAssignment> Assignments { get; }
        IEnumerable<IActiveVersion> ActiveVersions { get; }

        void Assign(IServer server, IServerRole role);
        void Unassign(IServer server, IServerRole role);
        
        void AddAssignment(IServerAssignment assignment);
        void RemoveAssignment(IServerAssignment assignment);

        void RegisterReleaseDeployment(IRelease release);
        void UnregisterComponentDeployed(IComponent component);
    }
}
